<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MTB CAT1 Peripheral driver library: High-Level</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><a href="http://www.cypress.com/"><img alt="Logo" src="IFXCYP_one-line.png"/></a></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">MTB CAT1 Peripheral driver library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__group__scb__spi__high__level__functions.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">High-Level<div class="ingroups"><a class="el" href="group__group__scb.html">SCB          (Serial Communication Block)</a> &raquo; <a class="el" href="group__group__scb__spi.html">SPI (SCB)</a> &raquo; <a class="el" href="group__group__scb__spi__functions.html">Functions</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">General Description</h2>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga6fdbb98ef7faddc5025fab510fb1617e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__scb__spi__enums.html#ga8ad22e7a296b64de0d41c983979d53b3">cy_en_scb_spi_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__scb__spi__high__level__functions.html#ga6fdbb98ef7faddc5025fab510fb1617e">Cy_SCB_SPI_Transfer</a> (<a class="el" href="struct_cy_s_c_b___type.html">CySCB_Type</a> *base, void *txBuffer, void *rxBuffer, uint32_t size, <a class="el" href="structcy__stc__scb__spi__context__t.html">cy_stc_scb_spi_context_t</a> *context)</td></tr>
<tr class="memdesc:ga6fdbb98ef7faddc5025fab510fb1617e"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function starts an SPI transfer operation.  <a href="#ga6fdbb98ef7faddc5025fab510fb1617e">More...</a><br /></td></tr>
<tr class="separator:ga6fdbb98ef7faddc5025fab510fb1617e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga27711123413735711f1b1c708ad7ce26"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__scb__spi__enums.html#ga8ad22e7a296b64de0d41c983979d53b3">cy_en_scb_spi_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__scb__spi__high__level__functions.html#ga27711123413735711f1b1c708ad7ce26">Cy_SCB_SPI_Transfer_Buffer</a> (<a class="el" href="struct_cy_s_c_b___type.html">CySCB_Type</a> *base, void *txBuffer, void *rxBuffer, uint32_t txSize, uint32_t rxSize, uint32_t writeFill, <a class="el" href="structcy__stc__scb__spi__context__t.html">cy_stc_scb_spi_context_t</a> *context)</td></tr>
<tr class="memdesc:ga27711123413735711f1b1c708ad7ce26"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function starts an SPI transfer operation with different lengths of Tx and Rx buffers.  <a href="#ga27711123413735711f1b1c708ad7ce26">More...</a><br /></td></tr>
<tr class="separator:ga27711123413735711f1b1c708ad7ce26"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga31e7821f7edc301ea6cf195da3c51498"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__scb__spi__high__level__functions.html#ga31e7821f7edc301ea6cf195da3c51498">Cy_SCB_SPI_AbortTransfer</a> (<a class="el" href="struct_cy_s_c_b___type.html">CySCB_Type</a> *base, <a class="el" href="structcy__stc__scb__spi__context__t.html">cy_stc_scb_spi_context_t</a> *context)</td></tr>
<tr class="memdesc:ga31e7821f7edc301ea6cf195da3c51498"><td class="mdescLeft">&#160;</td><td class="mdescRight">Aborts the current SPI transfer.  <a href="#ga31e7821f7edc301ea6cf195da3c51498">More...</a><br /></td></tr>
<tr class="separator:ga31e7821f7edc301ea6cf195da3c51498"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga95069817e25be749ae989e5d7131f8d0"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__scb__spi__high__level__functions.html#ga95069817e25be749ae989e5d7131f8d0">Cy_SCB_SPI_GetTransferStatus</a> (<a class="el" href="struct_cy_s_c_b___type.html">CySCB_Type</a> const *base, <a class="el" href="structcy__stc__scb__spi__context__t.html">cy_stc_scb_spi_context_t</a> const *context)</td></tr>
<tr class="memdesc:ga95069817e25be749ae989e5d7131f8d0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the status of the transfer operation started by <a class="el" href="group__group__scb__spi__high__level__functions.html#ga6fdbb98ef7faddc5025fab510fb1617e">Cy_SCB_SPI_Transfer</a>.  <a href="#ga95069817e25be749ae989e5d7131f8d0">More...</a><br /></td></tr>
<tr class="separator:ga95069817e25be749ae989e5d7131f8d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2736527b851afea1bc901581768ca566"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__scb__spi__high__level__functions.html#ga2736527b851afea1bc901581768ca566">Cy_SCB_SPI_GetNumTransfered</a> (<a class="el" href="struct_cy_s_c_b___type.html">CySCB_Type</a> const *base, <a class="el" href="structcy__stc__scb__spi__context__t.html">cy_stc_scb_spi_context_t</a> const *context)</td></tr>
<tr class="memdesc:ga2736527b851afea1bc901581768ca566"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of data elements transferred since the last call to <a class="el" href="group__group__scb__spi__high__level__functions.html#ga6fdbb98ef7faddc5025fab510fb1617e">Cy_SCB_SPI_Transfer</a>.  <a href="#ga2736527b851afea1bc901581768ca566">More...</a><br /></td></tr>
<tr class="separator:ga2736527b851afea1bc901581768ca566"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga6fdbb98ef7faddc5025fab510fb1617e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6fdbb98ef7faddc5025fab510fb1617e">&#9670;&nbsp;</a></span>Cy_SCB_SPI_Transfer()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__scb__spi__enums.html#ga8ad22e7a296b64de0d41c983979d53b3">cy_en_scb_spi_status_t</a> Cy_SCB_SPI_Transfer </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_cy_s_c_b___type.html">CySCB_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>txBuffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>rxBuffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__scb__spi__context__t.html">cy_stc_scb_spi_context_t</a> *&#160;</td>
          <td class="paramname"><em>context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function starts an SPI transfer operation. </p>
<p>It configures transmit and receive buffers for an SPI transfer. If the data that will be received is not important, pass NULL as rxBuffer. If the data that will be transmitted is not important, pass NULL as txBuffer and then the <a class="el" href="group__group__scb__spi__macros.html#ga01cb858faea2bc203ce96b9500d63776">CY_SCB_SPI_DEFAULT_TX</a> is sent out as each data element. Note that passing NULL as rxBuffer and txBuffer are considered invalid cases.</p>
<p>After the function configures TX and RX interrupt sources, it returns and <a class="el" href="group__group__scb__spi__interrupt__functions.html#ga0adeb497479d79c9ecea8169cfaff114">Cy_SCB_SPI_Interrupt</a> manages further data transfer.</p>
<ul>
<li>In the master mode, the transfer operation starts after calling this function</li>
<li>In the slave mode, the transfer registers and will start when the master request arrives.</li>
</ul>
<p>When the transfer operation is completed (requested number of data elements sent and received), the <a class="el" href="group__group__scb__spi__macros__xfer__status.html#gab024f7d6ed7cbaa36c80c904a6179de7">CY_SCB_SPI_TRANSFER_ACTIVE</a> status is cleared and the <a class="el" href="group__group__scb__spi__macros__callback__events.html#gafe7ca0de9c979f366dcd59bdd98f2165">CY_SCB_SPI_TRANSFER_CMPLT_EVENT</a> event is generated.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the SPI SCB instance.</td></tr>
    <tr><td class="paramname">txBuffer</td><td>The pointer of the buffer with data to transmit. The element size is defined by the data type that depends on the configured TX data width.</td></tr>
    <tr><td class="paramname">rxBuffer</td><td>The pointer to the buffer to store received data. The element size is defined by the data type that depends on the configured RX data width.</td></tr>
    <tr><td class="paramname">size</td><td>The number of data elements to transmit and receive.</td></tr>
    <tr><td class="paramname">context</td><td>The pointer to the context structure <a class="el" href="structcy__stc__scb__spi__context__t.html">cy_stc_scb_spi_context_t</a> allocated by the user. The structure is used during the SPI operation for internal configuration and data retention. The user must not modify anything in this structure.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__group__scb__spi__enums.html#ga8ad22e7a296b64de0d41c983979d53b3">cy_en_scb_spi_status_t</a></dd></dl>
<dl class="section note"><dt>Note</dt><dd><ul>
<li>The buffers must not be modified and must stay allocated until the end of the transfer.</li>
<li>This function overrides all RX and TX FIFO interrupt sources and changes the RX and TX FIFO level. </li>
</ul>
</dd></dl>

</div>
</div>
<a id="ga27711123413735711f1b1c708ad7ce26"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga27711123413735711f1b1c708ad7ce26">&#9670;&nbsp;</a></span>Cy_SCB_SPI_Transfer_Buffer()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__scb__spi__enums.html#ga8ad22e7a296b64de0d41c983979d53b3">cy_en_scb_spi_status_t</a> Cy_SCB_SPI_Transfer_Buffer </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_cy_s_c_b___type.html">CySCB_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>txBuffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>rxBuffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>txSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>rxSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>writeFill</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__scb__spi__context__t.html">cy_stc_scb_spi_context_t</a> *&#160;</td>
          <td class="paramname"><em>context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function starts an SPI transfer operation with different lengths of Tx and Rx buffers. </p>
<p>It configures transmit and receive buffers for an SPI transfer. If the data that will be received is not important, pass NULL as rxBuffer. If the data that will be transmitted is not important, pass NULL as txBuffer and then the <a class="el" href="group__group__scb__spi__macros.html#ga01cb858faea2bc203ce96b9500d63776">CY_SCB_SPI_DEFAULT_TX</a> is sent out as each data element. Note that passing NULL as rxBuffer and txBuffer are considered invalid cases.</p>
<p>After the function configures TX and RX interrupt sources, it returns and <a class="el" href="group__group__scb__spi__interrupt__functions.html#ga0adeb497479d79c9ecea8169cfaff114">Cy_SCB_SPI_Interrupt</a> manages further data transfer.</p>
<ul>
<li>In the master mode, the transfer operation starts after calling this function</li>
<li>In the slave mode, the transfer registers and will start when the master request arrives.</li>
</ul>
<p>When the transfer operation is completed (requested number of data elements sent and received), the <a class="el" href="group__group__scb__spi__macros__xfer__status.html#gab024f7d6ed7cbaa36c80c904a6179de7">CY_SCB_SPI_TRANSFER_ACTIVE</a> status is cleared and the <a class="el" href="group__group__scb__spi__macros__callback__events.html#gafe7ca0de9c979f366dcd59bdd98f2165">CY_SCB_SPI_TRANSFER_CMPLT_EVENT</a> event is generated.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the SPI SCB instance.</td></tr>
    <tr><td class="paramname">txBuffer</td><td>The pointer of the buffer with data to transmit. The element size is defined by the data type that depends on the configured TX data width.</td></tr>
    <tr><td class="paramname">rxBuffer</td><td>The pointer to the buffer to store received data. The element size is defined by the data type that depends on the configured RX data width.</td></tr>
    <tr><td class="paramname">txSize</td><td>The number of data elements to transmit.</td></tr>
    <tr><td class="paramname">rxSize</td><td>The number of data elements to receive.</td></tr>
    <tr><td class="paramname">writeFill</td><td>When rxSize is greater than txSize, writeFill value provided will be padded to the Tx. WriteFill value used will be as per TX FIFO byte mode configuration.</td></tr>
    <tr><td class="paramname">context</td><td>The pointer to the context structure <a class="el" href="structcy__stc__scb__spi__context__t.html">cy_stc_scb_spi_context_t</a> allocated by the user. The structure is used during the SPI operation for internal configuration and data retention. The user must not modify anything in this structure.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__group__scb__spi__enums.html#ga8ad22e7a296b64de0d41c983979d53b3">cy_en_scb_spi_status_t</a></dd></dl>
<dl class="section note"><dt>Note</dt><dd><ul>
<li>The buffers must not be modified and must stay allocated until the end of the transfer.</li>
<li>This function overrides all RX and TX FIFO interrupt sources and changes the RX and TX FIFO level. </li>
</ul>
</dd></dl>

</div>
</div>
<a id="ga31e7821f7edc301ea6cf195da3c51498"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga31e7821f7edc301ea6cf195da3c51498">&#9670;&nbsp;</a></span>Cy_SCB_SPI_AbortTransfer()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Cy_SCB_SPI_AbortTransfer </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_cy_s_c_b___type.html">CySCB_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__scb__spi__context__t.html">cy_stc_scb_spi_context_t</a> *&#160;</td>
          <td class="paramname"><em>context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Aborts the current SPI transfer. </p>
<p>It disables the TX and RX interrupt sources, clears the TX and RX FIFOs and the status.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the SPI SCB instance.</td></tr>
    <tr><td class="paramname">context</td><td>The pointer to the context structure <a class="el" href="structcy__stc__scb__spi__context__t.html">cy_stc_scb_spi_context_t</a> allocated by the user. The structure is used during the SPI operation for internal configuration and data retention. The user must not modify anything in this structure.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>If slave aborts transfer and the master is still transferring data, that data will be placed in the RX FIFO, and the TX underflow will be set. To drop data received into the RX FIFO, RX FIFO must be cleared when the transfer is complete. Otherwise, received data will be kept and copied to the buffer when <a class="el" href="group__group__scb__spi__high__level__functions.html#ga6fdbb98ef7faddc5025fab510fb1617e">Cy_SCB_SPI_Transfer</a> is called.</dd></dl>
<dl class="section user"><dt>Side Effects</dt><dd>The transmit FIFO clear operation also clears the shift register, so that the shifter can be cleared in the middle of a data element transfer, corrupting it. The data element corruption means that all bits that have not been transmitted are transmitted as "ones" on the bus. </dd></dl>

</div>
</div>
<a id="ga95069817e25be749ae989e5d7131f8d0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga95069817e25be749ae989e5d7131f8d0">&#9670;&nbsp;</a></span>Cy_SCB_SPI_GetTransferStatus()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t Cy_SCB_SPI_GetTransferStatus </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_cy_s_c_b___type.html">CySCB_Type</a> const *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__scb__spi__context__t.html">cy_stc_scb_spi_context_t</a> const *&#160;</td>
          <td class="paramname"><em>context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the status of the transfer operation started by <a class="el" href="group__group__scb__spi__high__level__functions.html#ga6fdbb98ef7faddc5025fab510fb1617e">Cy_SCB_SPI_Transfer</a>. </p>
<p>This status is a bit mask and the value returned may have a multiple-bit set.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the SPI SCB instance.</td></tr>
    <tr><td class="paramname">context</td><td>The pointer to the context structure <a class="el" href="structcy__stc__scb__spi__context__t.html">cy_stc_scb_spi_context_t</a> allocated by the user. The structure is used during the SPI operation for internal configuration and data retention. The user must not modify anything in this structure.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__group__scb__spi__macros__xfer__status.html">SPI Transfer Status</a>.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>The status is cleared by calling <a class="el" href="group__group__scb__spi__high__level__functions.html#ga6fdbb98ef7faddc5025fab510fb1617e">Cy_SCB_SPI_Transfer</a> or <a class="el" href="group__group__scb__spi__high__level__functions.html#ga31e7821f7edc301ea6cf195da3c51498">Cy_SCB_SPI_AbortTransfer</a>. </dd></dl>

</div>
</div>
<a id="ga2736527b851afea1bc901581768ca566"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga2736527b851afea1bc901581768ca566">&#9670;&nbsp;</a></span>Cy_SCB_SPI_GetNumTransfered()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t Cy_SCB_SPI_GetNumTransfered </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_cy_s_c_b___type.html">CySCB_Type</a> const *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcy__stc__scb__spi__context__t.html">cy_stc_scb_spi_context_t</a> const *&#160;</td>
          <td class="paramname"><em>context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the number of data elements transferred since the last call to <a class="el" href="group__group__scb__spi__high__level__functions.html#ga6fdbb98ef7faddc5025fab510fb1617e">Cy_SCB_SPI_Transfer</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>The pointer to the SPI SCB instance.</td></tr>
    <tr><td class="paramname">context</td><td>The pointer to the context structure <a class="el" href="structcy__stc__scb__spi__context__t.html">cy_stc_scb_spi_context_t</a> allocated by the user. The structure is used during the SPI operation for internal configuration and data retention. The user must not modify anything in this structure.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The number of data elements transferred. </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part
<div id="nav-path" class="navpath">
    <ul>
        <li class="footer">
            Generated for <b>MTB CAT1 Peripheral driver library</b> by <b>Cypress Semiconductor Corporation</b>.
            All rights reserved.
        </li>
    </ul>
</div>
-->
</body>
</html>
